<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FileMyReturns.ascx.cs" Inherits="MyCustomModules_FileMyReturns" EnableViewState="true"  %>

<portal:HeadingControl ID="heading" runat="server" Text="File IT Returns" />

 <script type="text/javascript">
             // Get the instance of PageRequestManager.
             var prm = Sys.WebForms.PageRequestManager.getInstance();
             // Add initializeRequest and endRequest
             prm.add_initializeRequest(prm_InitializeRequest);
             prm.add_endRequest(prm_EndRequest);
             
             // Called when async postback begins
             function prm_InitializeRequest(sender, args) {
             
                 // get the divImage and set it to visible
                 var divname=getDivName(args);
                 if ( divname !="")
                 {
                     var panelProg = $get(divname);                 
                    panelProg.style.display = '';
 
                    // Disable button that caused a postback
                    $get(args._postBackElement.id).disabled = true;
                 }
                
             }
             
             function getDivName(args)
             {
                 if ( args._postBackElement.id=='<%=btnUpdatePersonalDetails.ClientID%>')
                 {
                    return 'divPersonalDetails';
                 }
                 else if ( args._postBackElement.id=='<%=btnUpdateAddress.ClientID%>')
                 {
                    return 'divAddress';
                 }
                 else
                    return "";
             }
 
             // Called when async postback ends
             function prm_EndRequest(sender, args) {
             
                // var divname=getDivName(args);
                 
                // if ( divname !="")
                // {
                    // get the divImage and hide it again
                    //var panelProg = $get(divname);                 
                   // panelProg.style.display = 'none';
 
                    // Enable button that caused a postback
                  //  $get(sender._postBackSettings.sourceElement.id).disabled = false;
                 //}
                 
             }
         </script>



<asp:UpdatePanel ID="UpdatePanelPersonal" UpdateMode="Conditional" runat="server" >
<ContentTemplate>

<!-- ALL COLLAPSIBLE DEFINITIONS -->
     <ajaxToolkit:CollapsiblePanelExtender runat="server" ID="CollapsiblePanelExtender1"  TargetControlID="pnlPANFields" CollapsedText="Show Details..."
        ExpandedText="Hide Details" AutoCollapse="False" AutoExpand="False"  CollapseControlID="pnlPAN" ExpandControlID="pnlPAN" 
        CollapsedImage="~/Images/dbldn.jpg" ExpandedImage="~/Images/dblup.jpg" ImageControlID="Image2"  >
     </ajaxToolkit:CollapsiblePanelExtender>
     
      <ajaxToolkit:CollapsiblePanelExtender runat="server" ID="CollapsiblePanelExtender2"  TargetControlID="pnlAddressFields" CollapsedText="Show Details..."
        ExpandedText="Hide Details" AutoCollapse="False"   AutoExpand="False" CollapseControlID="pnlAddress" ExpandControlID="pnlAddress" 
        CollapsedImage="~/Images/dbldn.jpg" ExpandedImage="~/Images/dblup.jpg" ImageControlID="Image1">
     </ajaxToolkit:CollapsiblePanelExtender>
<!-- END OF ALL COLLAPSIBLE DEFINITIONS -->


<!-- PERSONAL DETAILS -->
<asp:Panel ID="pnlPersonalDtls" runat="server">
    <br />
    <h5>&nbsp;Personal Details for filing tax returns</h5>
    <br />
</asp:Panel>

<asp:Panel ID="pnlPersonalDtlsFields" runat="server">
    <table width='100%' border="0" >
        <tr>
            <td width="20%">Full Name:</td>
            <td > <asp:TextBox runat="server" ID="txtName" Width="300"></asp:TextBox> </td>
        </tr>
        <tr>
            <td >Father's Name:</td>
            <td > <asp:TextBox runat="server" ID="txtFName"  Width="300"></asp:TextBox> </td>
        </tr>
        <tr>
            <td valign="<% if (clnDOB.Visible == true) { %>top<%} else { %>middle<% } %>" >Date of Birth:</td>
            <td > 
                
               
                 <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                    <tr>
                        <td width="30%" valign="top">
                            <asp:TextBox runat="server" ID="txtDOB" ></asp:TextBox>
                        </td>
                        <td width="5%" valign="top">
                             <asp:Button ID="btnShowCal" runat="server" Text="..." OnClick="ShowCalendar" /> 
                        </td>
                        <td width="40%">
                            <asp:Calendar ID="clnDOB" runat="server"  Visible="false" OnSelectionChanged="clnDOB_SelectionChanged" > </asp:Calendar> 
                        </td width="25%">
                        <td>&nbsp;</td>
                    </tr>
                </table> 
            </td>
        </tr>
        <tr>
            <td >PAN:</td>
            <td > <asp:TextBox runat="server" ID="txtPAN"></asp:TextBox></td>
        </tr>
         <tr>
            <td>&nbsp;</td>
            <td > 
                <asp:Button ID="btnUpdatePersonalDetails" Text="Update Personal Details" runat="server" OnClick="btnUpdatePersonalDetails_Click" /> 
                <div id="divPersonalDetails" style="display:none;color:Blue;font-weight:bold;background-color:Yellow;" >Please wait...</div> 
            </td>
        </tr>
    </table>
</asp:Panel>
<!-- END OF ALL PERSONAL DETAILS -->

<!-- UPLOAD FORM 16  -->
<asp:Panel ID="Panel1" runat="server">
    <br />
    &nbsp;<b>Upload Scan copy or image of Form 16</b>
    <br /> 
    
    <table width='100%' border="0" >
        <tr>
            <td width="20%">Year:</td>
            <td >
            <asp:DropDownList ID="drpYears" runat="server" Width="30%" EnableViewState ="true"></asp:DropDownList> </td>
        </tr>
        <tr>
            <td>Form 16:</td>
            <td > <asp:FileUpload ID="uplForm16" runat="server"  />  </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td >
                <asp:Button ID="btnUploadForm16" runat="server" Text="Upload Form 16" Width="160" OnClick="btnUploadForm16_Click" /> 
                <asp:Label runat="server" ID="lblMessage" ></asp:Label>
            </td>
        </tr>
    </table>
</asp:Panel>

<!-- END OF ALL UPLOAD FORM 16 -->


<!-- ADDRESS DETAILS -->
<asp:Panel ID="pnlAddress" runat="server">
    <br />
    <h5>&nbsp;Address <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/dbldn.jpg"/></h5> (Optional, can be updated later for courier)
    <br /> <br />
    
</asp:Panel>


<asp:Panel ID="pnlAddressFields" runat="server">
    <table width='100%' border="0" >
        <tr>
            <td width="20%" valign="top">Complete Address:</td>
            <td > <asp:TextBox runat="server" ID="TextBox1" TextMode="MultiLine" Width="300" Height="150"></asp:TextBox>  </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td > 
                <asp:Button ID="btnUpdateAddress" Text="Update Address" runat="server" OnClick="btnUpdateAddress_Click" /> 
                <div id="divAddress" style="display:none;color:Blue;font-weight:bold;background-color:Yellow;">Please wait...</div> 
            </td>
        </tr>
    </table>
</asp:Panel>
<!-- END OF ALL ADDRESS DETAILS -->

<!-- UPLOAD PAN  -->
<asp:Panel ID="pnlPAN" runat="server">
    <br />
    <h5>&nbsp;PAN number not updated in IT department? <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/dbldn.jpg"/></h5> 
    <br /> 
</asp:Panel>

<asp:Panel ID="pnlPANFields" runat="server">
    <table width='100%' border="0" >
        <tr>
            <td width="20%">Upload Scan copy or image of PAN card</td>
            <td > <NeatUpload:InputFile ID="uplPAN" runat="server" /> </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td > <asp:Button ID="btnUploadPAN" runat="server" Text="Upload" Width="160" />  </td>
        </tr>
        <tr><td colspan="2"><br /><br /></td></tr>
    </table>
</asp:Panel>
<!-- END OF ALL UPLOAD PAN -->

</ContentTemplate> 
<Triggers>         <asp:PostBackTrigger ControlID="btnUploadForm16" />     </Triggers> 
</asp:UpdatePanel>


